package com.gitee.devinx3.mlc.message;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
//import org.springframework.cloud.stream.annotation.StreamListener;
//import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Component;

@Component
public class MessageReceive {

    private static final Logger logger = LoggerFactory.getLogger(MessageReceive.class);

    @StreamListener(Sink.INPUT)
    public void loggerSink(MsgCommand msgCommand) {
        // 每次收到来自 input 通道的消息时，Spring Cloud Stream 将执行此方法
        logger.debug("Received an msg for organization id {}：\r\n %s", msgCommand);
    }

}
